﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YhmOA.IDAL;
using YhmOA.Model;

namespace YhmOA.EFDAL
{
    public class Integrated_Car_DriverDAL : IIntegrated_Car_DriverDAL
    {
        private Entities entities;

        public Integrated_Car_DriverDAL()
        {
            entities = new Entities(typeof(Integrated_Car_Driver));
        }

        /// <summary>
        /// 取得司机姓名列表
        /// </summary>
        /// <returns>司机姓名列表</returns>
        public List<string> GetNameList()
        {
            var query = from item in this.entities.CreateObjectSet<Integrated_Car_Driver>()
                        select item.Name;
            return query.ToList<string>();
        }
    }
}
